/**
* \file NetworkContext.h
* \brief NetworkPlugin decleration class
* \author Edouard ROGE
* \date 29 Octobre 2013
*/
#ifndef _NETWORKCONTEXT_WIN32_
#define _NETWORKCONTEXT_WIN32_

#include "Network.h"
#include "Core/Network/INetworkContext.h"
#include "Core/Log/LogFile.h"

class NetworkContext : public Core::Network::INetworkContext
{
public:

	/**
	* \fn NetworkContext();
	* \brief Default contructor
	*/
	NetworkContext();

	/**
	* \fn virtual ~NetworkContext();
	* \brief Destructor
	*/
	virtual ~NetworkContext();

	/**
	* \fn virtual ITCPSocket * CreateTCPSocket() const;
	* \return Newly created connected socket (client side)
	* \brief Create a connected socket (client side)
	*/
	NETWORK_WIN32 virtual Core::Network::ITCPSocket * CreateTCPSocket() const;

	/**
	* \fn void DestroyTCPSocket(ITCPSocket * _pSocket) const;
	* \param Connected Socket to destroy, previsouly created by this context
	* \brief Destroy a connected socket
	*/
	NETWORK_WIN32 virtual void DestroyTCPSocket(Core::Network::ITCPSocket * _pSocket) const;

	/**
	* \fn virtual ITCPServerSocket * CreateTCPServerSocket() const;
	* \return Newly created connected socket (server side)
	* \brief Create a connected socket (server side)
	*/
	NETWORK_WIN32 virtual Core::Network::ITCPServerSocket * CreateTCPServerSocket() const;

	/**
	* \fn void DestroySocket(ISocket * _pSocket) const;
	* \param Connected Socket (server side) to destroy, previsouly created by this context
	* \brief Destroy a connected socket (server side)
	*/
	NETWORK_WIN32 virtual void DestroyTCPServerSocket(Core::Network::ITCPServerSocket * _pSocket) const;

	/**
	* \fn virtual IUDPSocket * CreateUDPSocket() const;
	* \return Newly created non-connected socket
	* \brief Create a non-connected socket
	*/
	NETWORK_WIN32 virtual Core::Network::IUDPSocket * CreateUDPSocket() const;

	/**
	* \fn virtual void DestroyUDPSocket(IUDPSocket * _pSocket) const;
	* \param Non-connected socket to destroy, previsouly created by this context
	* \brief Destroy a non-connected socket
	*/
	NETWORK_WIN32 virtual void DestroyUDPSocket(Core::Network::IUDPSocket * _pSocket) const;
	
private:
	Core::Log::LogFile m_logFile;
};


#endif // _NETWORKCONTEXT_WIN32_
